package org.yaaic.gps_utils;

import java.util.ArrayList;
import java.util.List;

public class UserCollection
{
    private static List<ChatUserObj> pastUsers;

    static{
        pastUsers = new ArrayList<ChatUserObj>();

        pastUsers.add( new ChatUserObj("nickName_0", "userName_0"));
        pastUsers.add( new ChatUserObj("nickName_1", "userName_1"));
        pastUsers.add( new ChatUserObj("nickName_2", "userName_2"));
        pastUsers.add( new ChatUserObj("anonymous", "aNoNyMoUs"));

    }


    public static boolean addChatUserObj(ChatUserObj chanObj){
        //TODO
        return false;
    }

    public static List<ChatUserObj> getAllChatUserObj(){

        return pastUsers;
    }

    public static List<ChatUserObj> getUsers(int quantity){
        if (quantity >= pastUsers.size() || quantity < 0) {
            quantity = pastUsers.isEmpty() ? 0 : pastUsers.size();
        }
        return pastUsers.subList(0, quantity);
    }

}
